package com.zhou.service;

import com.zhou.dao.BooksMapper;
import com.zhou.entity.Books;

import java.util.List;

/**
 * @Author: zhoubo
 * @Date: 2022/3/11 13:35
 * @Version 1.0
 */
public class BooksServiceImpl implements BooksService{
    private BooksMapper booksMapper;
    public void setBooksMapper(BooksMapper booksMapper){
        this.booksMapper = booksMapper;
    }

    @Override
    public List<Books> queryAllBooks() {
        return booksMapper.queryAllBooks();
    }

    public int addBook(Books book) {
        return booksMapper.addBook(book);
    }

    public int deleteBookById(int id) {
        return booksMapper.deleteBookById(id);
    }

    public int updateBook(Books books) {
        return booksMapper.updateBook(books);
    }

    public Books queryBookById(int id) {
        return booksMapper.queryBookById(id);
    }
}
